﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;


public class MessageItem : MonoBehaviour
{
    public Text senderNameText;
    public Text senderMessageText;
    public Message Message { get; set; }
    void Update()
    {
        if (Message != null)
        {
            senderNameText.text = Message.Sender.Name;
            string str = Message.Content;
            if (Message.ChatType == Chat.Common.ChatType.Private)
                str = "[瞧瞧对你说]:" + str;
            senderMessageText.text = str;
        }
    }
}
